package com.zhouxiao.multithreading.bank;

/**
 * @author 周明阳
 * mail:gqzmy@outlook.com
 * 时间:2018-03-13 9:34
 */

public class Bank {

    private int money;

    public int getMoney() {
        return money;
    }

    public Bank() {
    }

    public Bank(int money) {
        this.money = money;
    }

    /*人工柜台*/
    public void Counter(int money) {
        this.money -= money;
        System.out.println("A取走了" + money + "， 还剩下" + this.money);
    }

    /*ATM机*/
    public void ATM(int money) {
        this.money -= money;
        System.out.println("B取走了" + money + "， 还剩下" + this.money);
    }
}
